package com.tuanzi.loan.web.lazy.statistics;

import com.tuanzi.loan.business.service.statistics.RegistrationStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.RegistrationStatRequest;
import com.tuanzi.loan.vo.response.statistics.RegistrationStatResponse;
import org.springframework.data.domain.Page;

public class RegistrationStatLazyDataModel extends BaseLazyDataModel<RegistrationStatRequest,RegistrationStatResponse>{
    private RegistrationStatService registrationStatService = SpringContextHolder.getBean(RegistrationStatService.class);
    public RegistrationStatLazyDataModel(RegistrationStatRequest registrationStatRequest) {
        super(registrationStatRequest);
    }

    @Override
    protected Page<RegistrationStatResponse> doLoad(PageSearcher<RegistrationStatRequest> pageSearcher) {
        return registrationStatService.list(pageSearcher);
    }
}
